package ch.esn.client;

import ch.esn.client.view.RootView;

import com.extjs.gxt.ui.client.event.ComponentEvent;
import com.extjs.gxt.ui.client.widget.Window;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.annotation.Start;
import com.mvp4g.client.event.EventBus;

@Events(startView = RootView.class)
public interface MainEventBus extends EventBus {

	@Event(handlers = { ch.esn.client.presenter.RootPresenter.class })
	public void basicUserDataLoaded();

	@Event(handlers = { ch.esn.client.presenter.RootPresenter.class })
	public void initApp();

	@Event(handlers = { ch.esn.client.presenter.RootPresenter.class })
	public void itemSelected(ComponentEvent ce);

	@Event(handlers = { ch.esn.client.presenter.RootPresenter.class })
	public void loadLoggedUserData();

	@Event(handlers = { ch.esn.client.presenter.LoginPresenter.class })
	public void logout();

	@Event(handlers = { ch.esn.client.presenter.EditProfilePresenter.class })
	public void showEditProfileWindow();

	@Event(handlers = { ch.esn.client.presenter.LoginPresenter.class })
	public void showLogin();

	@Event(handlers = { ch.esn.client.presenter.RootPresenter.class })
	public void showWindow(Window w);

	@Start
	@Event(handlers = { ch.esn.client.presenter.LoginPresenter.class })
	public void start();
}
